﻿#region

using Vin.Extension.Framework.Login.Entities;

#endregion

namespace Vin.Extension.Framework.Login.ServiceInterface;

public interface ISysAccountService
{
    /// <summary>
    /// 查询账号
    /// </summary>
    public Task<SysAccount> QueryByIdAsync(long? id);

    /// <summary>
    /// 查询账号
    /// </summary>
    public Task<SysAccount?> QueryByAccountAsync(string account);

    /// <summary>
    /// 查询或添加账号
    /// </summary>
    public Task<(long?, bool)> QueryOrAddAsync(string account, string password);

    /// <summary>
    /// 检查账号是否存在
    /// </summary>
    public Task<bool> CheckAccountExistsAsync(string account);

    /// <summary>
    /// 重置账号密码
    /// </summary>
    public Task<bool> ResetPasswordAsync(long? id, string password);

    /// <summary>
    /// 根据员工id删除账号
    /// </summary>
    public Task<bool> DelAsync(long id);

    /// <summary>
    /// 启用禁用
    /// </summary>
    /// <param name="id"></param>
    /// <param name="enabled"></param>
    /// <returns></returns>
    public Task<bool> ChangeEnabledAsync(long id, bool? enabled);
}